/* ======================================================================

Java Source File -- Created with SAPIEN Technologies PrimalSCRIPT(TM)

NAME: PurchaseOrder.java

AUTHOR: Mallikarjun , scalarsoft
DATE  : 6/20/2002

COMMENT: <comment>

====================================================================== */
package com.scalar.chiptrack.finance;

import java.util.ArrayList;
import java.util.HashMap;

public class PurchaseOrder{
    
    
	private String purchaseOrderNumber;
    private String changeOrderNumber;
    private String vendorID;
    private String vendorName;
    private String billingAddress;
    private String contact;
    private String email;
    private String phone;
    private String fax;
    private String terms;
    private String fob;
    private String shipVia;
    private String totalQuantity;
    private String totalAmount;
    private HashMap shipping;
    private ArrayList poShippingList;
    private POShipping poShipping;
    
       
    
    public PurchaseOrder(){
    	shipping = new HashMap();
	}

    
    // Added by from here - kumar
    int purchaseOrderId = -1;    
    String shippingAddress = null;
    
    public int getPurchaseOrderId()
    {
        return purchaseOrderId;
    }
    
    public void setPurchaseOrderId(int purchaseOrderId)
    {
        this.purchaseOrderId = purchaseOrderId;
    }
    
    public String getShippingAddress()
    {
        return shippingAddress;
    }
    
    public void setShippingAddress(String shippingAddress)
    {
        this.shippingAddress = shippingAddress;
    }
    
    //Till -- here 
	public void setShipping(String id){
		shipping.put(id, poShippingList);
	}
	public HashMap getShipping(){
		return shipping;
	}
	public void createShippingList(){
		poShippingList = new ArrayList();
	}
	public void createShippingObject(){
		poShipping = new POShipping();
	}
	public void addShipID(String shipID){
		poShipping.setShipID(shipID);
	}
	public void addShipLocationName(String shipLocationName){
		poShipping.setShipLocationName(shipLocationName);
	}
	public void addShipTo(String shipTo){
		poShipping.setShipTo(shipTo);
	}
	public void addShipping(){
		poShippingList.add(poShipping);
	}
	public void closeShippingObject(){
		poShipping = null;
	}
	public void closeShippingList(){
		poShippingList = null;
	}		
    public void setPurchaseOrderNumber(String purchaseOrderNumber){
        this.purchaseOrderNumber = purchaseOrderNumber;
    }
    public String getPurchaseOrderNumber(){
        return purchaseOrderNumber;
    }
    public void setChangeOrderNumber(String changeOrderNumber){
        this.changeOrderNumber = changeOrderNumber;
    }
    public String getChangeOrderNumber(){
        return changeOrderNumber;
    }
    public void setVendorID(String vendorID){
        this.vendorID = vendorID;
    }
    public String getVendorID(){
        return vendorID;
    }
    
    public void setVendorName(String vendorName){
    	this.vendorName = vendorName;
    }
    public String getVendorName(){
    	return vendorName;
    }
    public void setBillingAddress(String billingAddress){
    	this.billingAddress = billingAddress;
    }
    public String getBillingAddress(){
    	return billingAddress;
    }
    
    public void setContact(String contact){
        this.contact = contact;
    }
    public String getContact(){
        return contact;
    }
    
    public void setEmail(String email){
        this.email = email;
    }
    public String getEmail(){
        return email;
    }
    
    public void setPhone(String phone){
        this.phone = phone;
    }
    public String getPhone(){
        return phone;
    }
    
    public void setFax(String fax){
        this.fax = fax;
    }
    public String getFax(){
        return fax;
    }
    
    public void setTerms(String terms){
        this.terms = terms;
    }
    public String getTerms(){
        return terms;
    }
    
    public void setFob(String fob){
        this.fob = fob;
    }
    public String getFob(){
        return fob;
    }
    
    public void setShipVia(String shipVia){
        this.shipVia = shipVia;
    }
    public String getShipVia(){
        return shipVia;
    }
    
    public void setTotalQuantity(String totalQuantity){
    	this.totalQuantity = totalQuantity;
    }
    public String getTotalQuantity(){
    	return totalQuantity;
    }
    
    public void setTotalAmount(String totalAmount){
    	this.totalAmount = totalAmount;
    }
    public String getTotalAmount(){
    	return totalAmount;
    }
    
  
    public  static class POShipping{
    
    	    private String shipID;
    		private String shipLocationName;
    		private String shipTo;
    		
		    public void setShipID(String shipID){
		        this.shipID = shipID;
		    }
		    public String getShipID(){
		        return shipID;
		    }
		    
		    public void setShipLocationName(String shipLocationName){
		    	this.shipLocationName = shipLocationName;
		    }
		    public String getShipLocationName(){
		    	return shipLocationName;
		    }
		    
		    public void setShipTo(String shipTo){
		        this.shipTo = shipTo;
		    }
		    public String getShipTo(){
		        return shipTo;
		    }		
    }
}